// Copyright (c) 2010 Manuel Peinado Gallego <manuel.peinado@gmail.com>
// Distributed under the MIT license

// OrientationGizmo.h : interface of the OrientationGizmo class
//


#pragma once

#include "Gizmo.h"


class OrientationGizmo : public Gizmo
{
public:
    
    OrientationGizmo(GizmoManager* manager);

protected:

    // override
    void drawGizmoEnds(View3d * view, const Color colors[3], 
                       double size) const override;

    void onNodeDrag(const ScreenPoint & dragPoint, gx::Mat4 & localTransform,
                    gx::Mat4 & gizmoTransform,  
                    NodeEvent::Property& prop) override;

    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    gx::Vec3 computeRotAxis(double dx, double dy, 
                            const gx::Mat4& parentInverse) const;
};